package com.weishenai.customerassistant.entity.sys;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author weishenai
 * @since 2021-11-27
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("sys_user")
@ApiModel(value="SysUserEntity对象", description="")
public class SysUserEntity extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("用户名")
    @TableField("username")
    private String username;

    @ApiModelProperty("密码")
    @TableField("password")
    private String password;

    @ApiModelProperty("用户icon链接")
    @TableField("avatar")
    private String avatar;

    @ApiModelProperty("邮箱")
    @TableField("email")
    private String email;

    @ApiModelProperty("城市")
    @TableField("city")
    private String city;

    @ApiModelProperty("所属供电所")
    @TableField("substation")
    private String substation;

    @ApiModelProperty("上次登录时间")
    @TableField("last_login")
    private LocalDateTime lastLogin;

    @TableField(exist = false)
    private List<SysRoleEntity> sysRoles = new ArrayList<>();
}
